<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <title>消息中心 | <?php echo ($site_name_cn); ?>安全应急响应中心</title>
        <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
        <meta name="description" content="<?php echo ($site_name_cn); ?>安全应急响应中心,<?php echo ($site_name_en); ?> Security Response Center">
        <meta name="keywords" content="<?php echo ($site_name_cn); ?>,<?php echo ($site_name_en); ?>,安全团队,应急响应,<?php echo ($site_name_cn); ?>安全应急响应中心,<?php echo ($site_name_en); ?> Security Response Center">
        <meta name="renderer" content="webkit">
        <meta name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5, user-scalable=no">
        <link rel="icon" href="/Public/Index/images/logo.ico">
        <link rel="stylesheet" href="/Public/Index/css/main.css">
        <!--[if (gte IE 6)&(lte IE 8)]>
        兼容 CSS3 选择器
        <script type="text/javascript" src="/Public/Index/js/selectivizr.min.js"></script>
        兼容 media query
        <script type="text/javascript" src="/Public/Index/js/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div class="header">
            <div>
                <div class="logo">
                    <a href="">
                        <div class="logo_pic">
                        </div>
                        <div class="logo_name">
							<p><?php echo ($site_name_cn); ?>安全应急响应中心</p>
                            <p><?php echo ($site_name_en); ?> Security Response Center</p>
                        </div>
                    </a>
                </div>

                <div class="userpanel">
                    <div class="userpanel_line">
                        <div></div>
                    </div>
                    <div class="userpanel_user">
                        <img class="user_avatar mod-avatar-30" src="/Public/Uploads/<?php echo session('avatar');?>" alt="">
                        <span class="user_username"><?php echo session('username'); if(session('mnum') == 0): else: ?><i class="i-header-message"><?php echo session('mnum');?></i><?php endif; ?></span>
                        <i class="user_arrow"></i>
                        <div class="user_menu">
                            <ul class="menu_list">
                                <li class="list_item list_item-user">
                                    <a href="<?php echo U('index/index');?>">
                                        <i class="item_icon"></i>
                                        <span class="item_text">个人主页</span>
                                    </a>
                                </li>
                                <li class="list_item list_item-message">
                                    <a href="<?php echo U('message/index');?>">
                                        <i class="item_icon"></i>
                                        <span class="item_text">消息中心</span>
                                        <i class="item_icon-message"><?php echo session('mnum');?></i>
                                    </a>
                                </li>
                                <li class="list_item list_item-account">
                                    <a href="<?php echo U('info/index');?>">
                                        <i class="item_icon"></i>
                                        <span class="item_text">账户设置</span>
                                    </a>
                                </li>
                                <li class="list_item list_item-logout">
                                    <a href="<?php echo U('login/logout');?>">
                                        <i class="item_icon"></i>
                                        <span class="item_text">注销</span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>

                <div class="nav">
                    <ul>
                        <li class="[index_banner]"><a href="/index.php">首页</a></li>
                        <li class="[banner_selected]"><a href="<?php echo U('post/add');?>">提交漏洞</a></li>
                        <li class="[annoucment_banner]"><a href="/index.php?m=&c=page&a=index">公告</a></li>
						<li class="[blog_banner]"><a href="/index.php?m=&c=blog&a=index">博客</a></li>
						<li class="[hall_banner]"><a href="/index.php?m=&c=hall&a=index">贡献榜</a></li>
                        <li class="[gift_banner]"><a href="<?php echo U('gift/index');?>">礼品兑换</a></li>
                    </ul>
                </div>
            </div>
        </div>
<div class="container container-user container-user-message">
            <div>
                <!-- section-subnav 标题-->
                <div class="section section-subnav">
                    <div class="section_subnav">
                        <p class="subnav_title"><a href="user-center.html">个人中心</a></p>
                    </div>
                </div>

                <div class="section section-user">
                    <div class="section_user">
                        <div class="user_sidebar">
                            <div class="sidebar_header">
                                <!-- <p>个人中心</p> -->
                            </div>
                            <ul class="sidebar_nav">
                               <li class="nav_item"><a href="<?php echo U('index/index');?>">我的个人中心</a></li>
                                <li class="nav_item"><a href="<?php echo U('gift/record');?>">我的安全币</a></li>
                                <li class="nav_item"><a href="<?php echo U('post/index');?>">我报告的漏洞</a></li>
								<li class="nav_item"><a href="<?php echo U('gift/order');?>">我的礼品</a></li>
                                <li class="nav_item nav_item-active"><a href="<?php echo U('message/index');?>">消息中心</a></li>
                                <li class="nav_item"><a href="<?php echo U('info/index');?>">我的个人信息</a></li>
                            </ul>
                        </div>

                        <div class="user_body">
                            <div class="body_header">
                                <div class="header_message">
                                    <div class="message_pic"><i></i></div>
                                    <div class="message_info-1">
                                        <p class="info-1_message">
                                            <span class="message_text">我的消息</span>
                                            <span class="message_num"><span class="num_num"><?php echo ($count); ?></span>条</span>
                                        </p>
                                        <!-- <a class="info-1_detail" href="">漏洞评审细则 >></a> -->
                                    </div>
                                </div>
                            </div>
                            <div class="body_content">
                                <div class="mod-sheet">
                                    <div class="sheet_header">
                                        <p class="header_title">消息中心</p>
                                    </div>
                                    <div class="sheet_body">
                                        <table class="body_table">
                                            <thead>
                                                <tr>
                                                    <th class="th-2">消息主题</th>
                                                    <th class="th-3">消息类型</th>
                                                    <th class="th-4">发送者</th>
                                                    <th class="th-5">时间</th>
                                                </tr>
                                            </thead>
                                            <tbody>
												<?php if(is_array($message)): foreach($message as $key=>$v): ?><tr>
                                                    <!--<td><input class="input-checkbox" type="checkbox"></td>-->
                                                    <td class="table_message <?php if($v["read"] == 0): ?>table_message-new<?php endif; ?>"><a onclick="message_read('<?php echo ($v["id"]); ?>');"><?php echo ($v["content"]); ?></a></td>
                                                    <td style="text-align:center"><?php echo ($v["type"]); ?></td>
                                                    <td style="text-align:center"><?php echo ($v["sender"]); ?></td>
                                                    <td style="text-align:center"><?php echo (date("Y/m/d",strtotime($v["time"]))); ?></td>
                                                </tr><?php endforeach; endif; ?>
                                            </tbody>
                                        </table>
                                    </div>

                                    <div class="mod-pageflip">
                                        <ul>
                                           <?php echo ($page); ?>
                                        </ul>
                                    </div>

                                    <!--<a href="" class="mod-btn mod-btn-black">已读选中消息</a>-->

                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
		<script>
		function message_read(message_id){
							$.ajax({
								url: "/user.php?m=user&c=message&a=readed",
								type: "POST",
								data: {mid:message_id},
								success: function (data) {
									if (data.status == "1") {
										window.location.reload();
									}else{
										window.location.reload();
									}
								},
								error: function () {
									window.location.reload();
								}
							});
		}
		</script>
<!-- footer -->
        <div class="footer">
            <div>
                <div class="footer_about">
                    <p class="about_link">
                        <a href="<?php echo ($site_about); ?>" target="_blank">关于腾讯</a>
                        |
                        <a href="<?php echo ($site_career); ?>">加入我们</a>
                        |
                        <a href="/user.php?m=user&c=post&a=add">报告漏洞</a>
                    </p>
                    <p class="about_copyright">
                        <span>Copyright &copy; <?php echo date('Y'); ?> <?php echo ($site_copyright); ?>. All Rights Reserved</span>
						<span>Powered by <a href="https://security.tencent.com/index.php/xsrc">Tencent xSRC</a></span>
                    </p>
                </div>

                <div class="footer_contact">
                    <a class="contact_icon-email" href="mailto:<?php echo ($site_email); ?>"><i></i><span>专用邮箱</span>|</a>
                    <a class="contact_icon-weixin mod-qrcode" href="">
                        <i></i><span>微信公众号</span>
                        <div class="qrcode">
                            <div class="qrcode_pic">
                                <img src="<?php echo ($site_wechat); ?>" alt="">
                            </div>
                            <span class="qrcode_text">扫一扫关注公众号</span>
                        </div>
                    </a>
                </div>
            </div>
        </div>

        <script src="/Public/Index/js/jquery-1.7.2.min.js"></script>
        <script src="/Public/Index/js/test.js"></script>
		<script src="https://security.tencent.com/static/plugins/jquery.ajaxfileupload.js"></script>
    </body>
</html>